#pragma once

#include "../util.hpp"
#include "../result.hpp"

namespace pharmacy_server
{
    class PurchaseView
    {
    public:
        static Result create_purchase_order(bool succ, const std::string& desc)
        {
            if (succ)
                return Result(Result::SUCCESS, desc);
            else
                return Result(Result::FAILED, desc);
        }

        static Result query_purchase_records(bool succ, const std::string& desc, const std::string& data = "")
        {
            if (succ)
                return Result(Result::SUCCESS, desc, data);
            else
                return Result(Result::FAILED, desc);
        };
    };
}